<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<link href="css/bootstrap.min.css?v=3.3.6" th:href="@{/css/bootstrap.min.css?v=3.3.6}" rel="stylesheet">
<head th:include="@{include} :: header"></head>
<style type="text/css">
    html,body{
        width: 100%;
        height: 100%;
        margin: 0px;
    }
    .map{
        height: 450px;
        width: 100%;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12 ibox-content">
            <div class="ibox float-e-margins">
                <form class="form-horizontal m-t layui-form" id="signupForm">
                    <div class="col-xs-5 ">
                        <input id="id" name="id" th:value="${shop.id}" type="hidden" />
                        <div class="form-group">
                            <label class="col-sm-3 control-label">企业名称：</label>
                            <div class="col-sm-8">
                                <input id="shopName" name="shopName" th:value="${shop.shopName}" class="form-control" type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">经纬度：</label>
                            <div class="col-sm-8" style="display: flex">
                                <input id="longitude" name="longitude" style="width: 48%" th:value="${shop.longitude}" class="form-control" type="text">
                                <input id="latitude" name="latitude"  style="width: 48%" th:value="${shop.latitude}" class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">所属片区：</label>
                            <div class="col-sm-8">
                                <select data-placeholder="--请选择--" name="pianquId" id="pianquId" class="layui-input">
                                    <option value="">请选择所属片区</option>
                                    <option th:each="pianqu:${pianquList}" th:value="${pianqu.id}"
                                            th:selected="${pianqu.id eq shop.pianquId}" th:text="${pianqu.jituanName + ' - ' + pianqu.pianquName}"></option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">企业地址：</label>
                            <div class="col-sm-8">
                                <input id="address" name="address" th:value="${shop.address}" class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">联系电话：</label>
                            <div class="col-sm-8">
                                <input id="telphone" name="telphone" th:value="${shop.telphone}" class="form-control" type="text">
                            </div>
                        </div>
<!--                        <div class="form-group">-->
<!--                            <label class="col-sm-3 control-label">企业类型：</label>-->
<!--                            <div class="col-sm-8">-->
<!--                                <select data-placeholder="&#45;&#45;请选择&#45;&#45;" name="shopType" id="shopType" class="form-control chosen-select">-->
<!--                                    <option value="1" th:selected="${shop.shopType == 1}">巡检企业</option>-->
<!--                                    <option value="2" th:selected="${shop.shopType == 2}">车辆预约地点</option>-->
<!--                                    <option value="3" th:selected="${shop.shopType == 3}">烟花爆竹商铺</option>-->
<!--                                    <option value="4" th:selected="${shop.shopType == 4}">设备检测企业</option>-->
<!--                                    <option value="5" th:selected="${shop.shopType == 5}">筒仓测距企业</option>-->
<!--                                </select>-->
<!--                            </div>-->
<!--                        </div>-->
                        <div class="form-group">
                            <label class="col-sm-3 control-label">企业类型：</label>
                            <div class="col-sm-8">
                                <input type="hidden" id="hidShopTypes" name="hidShopTypes" th:value="${shopTypesJson}" />
                                <div class="layui-col-xs6" th:each="type:${shopTypes}">
                                    <div class="layui-form-item " style="margin-bottom: 0px;">
                                        <label class="layui-form-label" style="width: 120px;" th:text="${type.typeName}"></label>
                                        <div class="layui-input-block">
                                            <input type="checkbox" th:if="${type.isCheck == 1}" checked="" name="open" th:value="${type.typeValue}" lay-skin="switch" lay-filter="switchTest" title="开关">
                                            <input type="checkbox" th:if="${type.isCheck == 0}" name="open" th:value="${type.typeValue}" lay-skin="switch" lay-filter="switchTest" title="开关">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">设备数类型：</label>
                            <div class="col-sm-8">
                                <select data-placeholder="--请选择--" name="deviceShowType" id="deviceShowType" class="form-control chosen-select">
                                    <option value="1" th:selected="${shop.deviceShowType == 1}">显示节点数</option>
                                    <option value="0" th:selected="${shop.deviceShowType == 0}">显示设备数</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">状态：</label>
                            <div class="col-sm-8">
                                <select data-placeholder="--请选择--" name="state" id="state" class="form-control chosen-select">
                                    <option value="1" th:selected="${shop.state == 1}">启用</option>
                                    <option value="0" th:selected="${shop.state == 0}">关闭</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">控制台名称：</label>
                            <div class="col-sm-8">
                                <input id="controlText" name="controlText" th:value="${shop.controlText}" class="form-control" type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">企业LOGO：</label>
                            <div class="col-sm-8">
                                <input type="file" name="file" id="uploadfile" class="file-loading"/>
                                <input id="shopLogo" name="shopLogo" th:value="${shop.shopLogo}" type="hidden"/>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-7">
                        <div id="container" class="map"></div>
                        <div id="myPageTop">
                            <table>
                                <tr>
                                    <td>
                                        <label>请输入关键字：</label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <input id="tipinput"/>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script th:inline="javascript">
    var logoUrlFile = eval([[${shop.shopLogoFile}]]);
</script>
<script type="text/javascript" th:src="@{/js/appjs/module/shop/detail.js}"></script>
<script type="text/javascript" th:src="@{/js/gaode.js}"></script>
</body>
</html>
